using System;
using TestCases.CompareAssert.Core.Interfaces;

namespace TestCases.CompareAssert.Core.Builders
{
    public class ReadOnlyBuilder : IResultBuilder, IObjectExpression
    {
        private readonly ICompareResult _result;

        public ReadOnlyBuilder(ICompareResult readOnlyResult)
        {
            _result = readOnlyResult;
        }

        public IResultBuilder IsNot<T>()
        {
            return this;
        }

        public IResultBuilder IsNot(Type type)
        {
            return this;
        }

        public IResultBuilder IsNot(string type)
        {
            return this;
        }

        public IObjectExpression Left
        {
            get { return this; }
        }

        public IObjectExpression Right
        {
            get { return this; }
        }

        public IObjectExpression Both
        {
            get { return this; }
        }

        public IResultBuilder Message(string message)
        {
            return this;
        }

        public IResultBuilder With(object args)
        {
            return this;
        }

        public IResultBuilder Status(CompareStatus status)
        {
            return this;
        }

        public CompareStatus GetStatus()
        {
            return _result.Status;
        }

        public string GetMessage()
        {
            return _result.Message;
        }

        public object GetArgs()
        {
            return null;
        }

        public ICompareResult GetResult()
        {
            return _result;
        }
    }
}